public void inOrderReview(Node head){
    if(head!=null){
        Stack<Node> s1=new Stack<>();
        s1.add(head);
        while(!s1.isEmpty()||head!=null){
           if(head.left!=null){
               s1.push(head.left);
               head=head.left;
           }
           else{
               head=s1.pop();
               System.out.print(head.value+" ");
               head=head.right;
           }

        }
    }
}

public void posOrder(Node head){
    if(head!=null){
        Stack<Node> s1=new Stack<>();
        Stack<Node> s2=new Stack<>();

        stack.add(head);
        if(!s1.isEmpty()){
            head=s1.pop();
            s2.push(head);
            if(head.left!=null){
                s1.push(head.left);
            }
            if(head.right!=null){
                s1.push(head.right);
            }
        }

        while(!s2.isEmpty()){
            System.out.print(s2.pop().value+" ");
        }
    }
}